import { createApp } from 'vue';
import ElementPlus from 'element-plus';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import 'element-plus/dist/index.css';
import App from './App.vue';
import '@/styles/index.scss';
import router from './router';
import pinia from './store';
//暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css';

const app = createApp(App);
app.use(ElementPlus, {
  locale: zhCn,
});
import 'virtual:svg-icons-register';

import globalComponent from '@/components/index';
app.use(globalComponent);
app.use(router);
app.use(pinia);

// 路由守卫
import '@/permisstion.ts';

//引入自定义指令
import { isHasButton } from './directive/has';
isHasButton(app);
app.mount('#app');
